
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>


</h:head>


<h:body>

	<style media="screen" type="text/css">
.ui-widget,.ui-widget .ui-widget {
	font-size: 90% !important;
}
</style>

	<p:tabMenu activeIndex="0">
		<p:menuitem value="Add user" url="/index.jsf" />
		<p:menuitem value="View users" url="/viewUser.jsf" />

	</p:tabMenu>

	<h:form>
		<p:panel header="Add user">
			<h:panelGrid columns="2">
				<p:outputLabel value="Nome do Evento:" />
						<p:inputText id="txtNomeEvento"
							value="#{eventoBean.eventoSelecionado.nome}" size="25"
							 />
						<p:outputLabel value="Tipo:" />
						<p:selectOneMenu id="cboTipos"
							value="#{eventoBean.eventoSelecionado.tipo}" >
							<f:selectItem itemLabel="Escolha um tipo de Evento" />
							<f:selectItems value="#{eventoBean.tipoSelect}" />
						</p:selectOneMenu>
						<p:outputLabel id="txtGenero" value="Genero:" />
						<p:inputText size="25" />
						<p:outputLabel id="txtLocal" value="Local:" />
						<p:inputText value="#{eventoBean.eventoSelecionado.local}"
							size="25"  />
						<p:outputLabel value="Data de Início:" />
						<p:calendar id="calDataInicio"
							value="#{eventoBean.eventoSelecionado.dataInicio}" size="25"
							></p:calendar>
						<p:outputLabel value="Data de Término:" />
						<p:calendar id="calDataFinal"
							value="#{eventoBean.eventoSelecionado.dataFinal}" size="25"
							></p:calendar>
						<p:outputLabel value="Descrição" />
						<p:inputTextarea id="textArea"
							value="#{eventoBean.eventoSelecionado.descricao}" size="10000"
							 />
				<h:outputText value="Add Photo:" />
				<p:commandButton onclick="fileDialogWidget.show()"
					value="Upload Photo"></p:commandButton>

			</h:panelGrid>

		</p:panel>
		<p:separator>
		</p:separator>
		<p:commandButton value="Add user" actionListener="#{eventoBean.salvar}" ></p:commandButton>


		<p:dialog id="fileDialog" header="Basic Dialog"
			widgetVar="fileDialogWidget">
			<p:fileUpload fileUploadListener="#{eventoBean.handleFileUpload}" oncomplete="fileDialogWidget.hide()"
				mode="advanced" dragDropSupport="false" fileLimit="1"
				allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />
		</p:dialog>


	</h:form>

</h:body>
</html>
